import java.awt.image.BufferedImage;

/*
    所有飞行物的父类
 */
public abstract class fly {
    protected BufferedImage pic;
    protected int height;
    protected int width;
    protected int x;
    protected int y;

    //无参构造方法 - 防止其他子类报错
    public fly(){

    }

    //有参构造方法 - 为了方便子类使用
    public fly(BufferedImage pic, int x, int y){
        this.pic = pic;
        this.x = x;
        this.y = y;
    }

    public abstract void move();

    public BufferedImage getPic() {
        return pic;
    }

    public void setPic(BufferedImage pic) {
        this.pic = pic;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
}
